<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.2"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:u="urn:jsptagdir:/WEB-INF/tags/util/"
	xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
	xmlns:s="http://www.springframework.org/tags">
<jsp:directive.page contentType="text/html" pageEncoding="UTF-8" />
	<c:url value="/" var="rootURL" />
	<div class="page-header">
		<div class="row">
			<div class="span8">
				<h1>${account.label}</h1>
				<s:message code="account.id" arguments="${account.accountId}" />
			</div>
			<div class="span4 align-right">
				<h3><s:message code="transferHistory.title" /></h3>
				<a href="${rootURL}account/${account.accountId}/${selectedYear}/${selectedMonth}" class="btn btn-primary"><s:message code="account.details" /></a>
			</div>
		</div>
	</div>
	<u:monthsBar selectedYear="${selectedYear}" selectedMonth="${selectedMonth}" history="${history}" url="${rootURL}transfer/${account.accountId}" />
	<h3 class="capitalized"><fmt:parseDate value="${dateSelectedMonth}" var="parsedDate" pattern="yyyy-MM-dd'T'HH:mm:ss.SSSXXX" /><fmt:formatDate value="${parsedDate}" pattern="MMMM yyyy" /></h3>
	<table class="table table-striped">
		<thead>
			<tr>
				<th class="span2"><s:message code="table.transaction.date" /></th>
				<th class="span7"><s:message code="table.transaction.label" /></th>
				<th class="span2"><s:message code="table.transaction.amount" /></th>
			</tr>
		</thead>
		<tbody>
			<c:choose>
				<c:when test="${transactions.size() == 0}">
					<tr>
						<td></td>
						<td><span class="muted"><s:message code="transferHistory.none" /></span></td>
						<td></td>
					</tr>	
				</c:when>
				<c:otherwise>
					<c:forEach var="transfer" items="${transactions}">
						<tr>
							<td><u:shortDate value="${transfer.date}" /></td>
							<td>${transfer.label}</td>
							<td><u:outBalance value="${transfer.amount}" /></td>
						</tr>
					</c:forEach>
				</c:otherwise>
			</c:choose>
		</tbody>
	</table>
	<u:pagesBar currentPage="${currentPage}" nbPages="${nbPages}" url="${rootURL}transfer/${account.accountId}/${selectedYear}/${selectedMonth}" />
</jsp:root>